.class Lcom/netease/newsreader/activity/ShareToMicroBlog$postEditMessage4Renren;
.super Ljava/lang/Thread;
.source "ShareToMicroBlog.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/netease/newsreader/activity/ShareToMicroBlog;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = "postEditMessage4Renren"
.end annotation


# instance fields
.field private img:Ljava/lang/String;

.field private msg4Renren:Ljava/lang/String;

.field private s:Ljava/lang/String;

.field private t:Ljava/lang/String;

.field final synthetic this$0:Lcom/netease/newsreader/activity/ShareToMicroBlog;


# direct methods
.method public constructor <init>(Lcom/netease/newsreader/activity/ShareToMicroBlog;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
    .locals 1
    .parameter
    .parameter "message"
    .parameter "t"
    .parameter "s"
    .parameter "img"

    .prologue
    .line 927
    iput-object p1, p0, Lcom/netease/newsreader/activity/ShareToMicroBlog$postEditMessage4Renren;->this$0:Lcom/netease/newsreader/activity/ShareToMicroBlog;

    .line 922
    invoke-direct {p0}, Ljava/lang/Thread;-><init>()V

    .line 918
    const-string v0, ""

    iput-object v0, p0, Lcom/netease/newsreader/activity/ShareToMicroBlog$postEditMessage4Renren;->msg4Renren:Ljava/lang/String;

    .line 919
    const-string v0, ""

    iput-object v0, p0, Lcom/netease/newsreader/activity/ShareToMicroBlog$postEditMessage4Renren;->t:Ljava/lang/String;

    .line 920
    const-string v0, ""

    iput-object v0, p0, Lcom/netease/newsreader/activity/ShareToMicroBlog$postEditMessage4Renren;->s:Ljava/lang/String;

    .line 921
    const-string v0, ""

    iput-object v0, p0, Lcom/netease/newsreader/activity/ShareToMicroBlog$postEditMessage4Renren;->img:Ljava/lang/String;

    .line 923
    iput-object p2, p0, Lcom/netease/newsreader/activity/ShareToMicroBlog$postEditMessage4Renren;->msg4Renren:Ljava/lang/String;

    .line 924
    iput-object p3, p0, Lcom/netease/newsreader/activity/ShareToMicroBlog$postEditMessage4Renren;->t:Ljava/lang/String;

    .line 925
    iput-object p4, p0, Lcom/netease/newsreader/activity/ShareToMicroBlog$postEditMessage4Renren;->s:Ljava/lang/String;

    .line 926
    iput-object p5, p0, Lcom/netease/newsreader/activity/ShareToMicroBlog$postEditMessage4Renren;->img:Ljava/lang/String;

    return-void
.end method


# virtual methods
.method public run()V
    .locals 9

    .prologue
    const/4 v8, 0x1

    .line 930
    new-instance v1, Landroid/os/Message;

    invoke-direct {v1}, Landroid/os/Message;-><init>()V

    .line 931
    .local v1, msg:Landroid/os/Message;
    iput v8, v1, Landroid/os/Message;->what:I

    .line 932
    iput v8, v1, Landroid/os/Message;->arg1:I

    .line 934
    :try_start_0
    iget-object v4, p0, Lcom/netease/newsreader/activity/ShareToMicroBlog$postEditMessage4Renren;->msg4Renren:Ljava/lang/String;

    new-instance v5, Ljava/lang/StringBuilder;

    invoke-static {v4}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v4

    invoke-direct {v5, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget-object v4, p0, Lcom/netease/newsreader/activity/ShareToMicroBlog$postEditMessage4Renren;->this$0:Lcom/netease/newsreader/activity/ShareToMicroBlog;

    invoke-virtual {v4}, Lcom/netease/newsreader/activity/ShareToMicroBlog;->getShortUrl()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v5, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    iput-object v4, p0, Lcom/netease/newsreader/activity/ShareToMicroBlog$postEditMessage4Renren;->msg4Renren:Ljava/lang/String;

    .line 935
    new-instance v4, Ljava/lang/StringBuilder;

    const-string v5, "img:"

    invoke-direct {v4, v5}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget-object v5, p0, Lcom/netease/newsreader/activity/ShareToMicroBlog$postEditMessage4Renren;->img:Ljava/lang/String;

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    invoke-static {v4}, Lcom/netease/newsreader/util/Logger;->i(Ljava/lang/String;)V

    .line 936
    iget-object v4, p0, Lcom/netease/newsreader/activity/ShareToMicroBlog$postEditMessage4Renren;->this$0:Lcom/netease/newsreader/activity/ShareToMicroBlog;

    invoke-static {v4}, Lcom/netease/newsreader/activity/ShareToMicroBlog;->access$21(Lcom/netease/newsreader/activity/ShareToMicroBlog;)Lcom/renren/api/connect/android/Renren;

    move-result-object v4

    new-instance v5, Lcom/renren/api/connect/android/share/ShareSetRequestParam;

    iget-object v6, p0, Lcom/netease/newsreader/activity/ShareToMicroBlog$postEditMessage4Renren;->img:Ljava/lang/String;

    iget-object v7, p0, Lcom/netease/newsreader/activity/ShareToMicroBlog$postEditMessage4Renren;->msg4Renren:Ljava/lang/String;

    invoke-direct {v5, v6, v7}, Lcom/renren/api/connect/android/share/ShareSetRequestParam;-><init>(Ljava/lang/String;Ljava/lang/String;)V

    invoke-virtual {v4, v5}, Lcom/renren/api/connect/android/Renren;->publishShare(Lcom/renren/api/connect/android/share/ShareSetRequestParam;)Lcom/renren/api/connect/android/share/ShareSetResponseBean;

    move-result-object v3

    .line 937
    .local v3, response:Lcom/renren/api/connect/android/share/ShareSetResponseBean;
    if-eqz v3, :cond_0

    .line 938
    invoke-virtual {v3}, Lcom/renren/api/connect/android/share/ShareSetResponseBean;->getResult()I

    move-result v2

    .line 939
    .local v2, r:I
    if-ne v2, v8, :cond_0

    .line 940
    const/4 v4, 0x0

    iput v4, v1, Landroid/os/Message;->arg1:I
    :try_end_0
    .catch Lcom/renren/api/connect/android/exception/RenrenException; {:try_start_0 .. :try_end_0} :catch_0
    .catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_1

    .line 954
    .end local v2           #r:I
    .end local v3           #response:Lcom/renren/api/connect/android/share/ShareSetResponseBean;
    :cond_0
    :goto_0
    iget-object v4, p0, Lcom/netease/newsreader/activity/ShareToMicroBlog$postEditMessage4Renren;->this$0:Lcom/netease/newsreader/activity/ShareToMicroBlog;

    iget-object v4, v4, Lcom/netease/newsreader/activity/ShareToMicroBlog;->reflashormoreDataHandler:Landroid/os/Handler;

    invoke-virtual {v4, v1}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z

    .line 955
    return-void

    .line 946
    :catch_0
    move-exception v0

    .line 948
    .local v0, e:Lcom/renren/api/connect/android/exception/RenrenException;
    invoke-virtual {v0}, Lcom/renren/api/connect/android/exception/RenrenException;->printStackTrace()V

    goto :goto_0

    .line 949
    .end local v0           #e:Lcom/renren/api/connect/android/exception/RenrenException;
    :catch_1
    move-exception v0

    .line 951
    .local v0, e:Ljava/lang/Throwable;
    invoke-virtual {v0}, Ljava/lang/Throwable;->printStackTrace()V

    goto :goto_0
.end method
